<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<f:view>
<head>
<title>Login</title>
<link type="text/css"
	href="#{facesContext.externalContext.requestContextPath}/style/style.css"
	rel="stylesheet"></link>
</head>
<body>
	<div class="main">
		<h:graphicImage url="/images/logo.jpg" />
		<div>
			<h:form id="formlogin">
				<rich:panel rows="3" headerClass="head_listacurso"
					cellpadding="5px" cellspacing="5px" styleClass="table_listacurso"
					rowClasses="tr_login" columns="2">
					<f:facet name="header">
						<h:outputText value="#{bundle.titlogin}" />
					</f:facet>
					<table>
						<tr>
							<td><h:outputText value="#{bundle.loginusuario}:" /></td>
							<td>
								<h:inputText value="#{loginBean.login}" id="userLogin">
									<f:validator validatorId="autenticaValidator" />
									<f:attribute name="senha" value="#{senha}" />
									<f:converter converterId="KeyLowerCaseConverter"/>
								</h:inputText>								
							</td>
						</tr>
						<tr>
							<td><h:outputText value="#{bundle.loginsenha}:" /></td>
							<td><h:inputSecret binding="#{senha}" value="#{loginBean.senha}" id="sen" /></td>
						</tr>
						<tr>
							<td colspan="2">
								<h:commandButton value="#{bundle.loginbotao}" action="#{loginBean.logar}" />
							</td>
						</tr>
					</table>
				</rich:panel>
				<p><h:message for="userLogin" style="color: blue;font-weight: bold" /></p>			
			</h:form>
			<h:form id="formbandeiras">
				<h:commandLink action="#{loginBean.mudarIdioma}">
					<h:graphicImage value="/images/pt_br.png" style="border:none" />
					<f:setPropertyActionListener value="pt_BR"
						target="#{loginBean.idioma}" />
				</h:commandLink>
				<h:outputText value=" " />
				<h:commandLink action="#{loginBean.mudarIdioma}">
					<h:graphicImage value="/images/en_us.jpg" style="border:none" />
					<f:setPropertyActionListener value="en"
						target="#{loginBean.idioma}" />
				</h:commandLink>
			</h:form>
		</div>
	</div>
</body>
</f:view>
</html>